<template>
  <div id="app">
    {{$store.state.count}}
    <button type="button" @click="minu">-</button>
    <button type="button" @click="add">+</button>
  </div>
</template>

<script>
export default {
  name: 'app',
  created(){
  },
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  methods:{
    add(){
       this.$store.dispatch('addCount', 1);
    },
    minu(){
       this.$store.dispatch('minusCount', 1);
    }
  }
}
</script>

<style>
</style>
